package com.edu.jsu.eduservice;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;

/**
 * @author 廖俊杰
 * @version 1.0
 * @date 2021/11/29 10:00
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.edu.jsu"})
@EnableDiscoveryClient
public class EduServiceApplication {


    private static final Logger LOG = LoggerFactory.getLogger(EduServiceApplication.class);

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(EduServiceApplication.class);

        Environment environment = app.run(args).getEnvironment();

        LOG.info("启动成功!!");
        LOG.info("EduService地址：\thttp://127.0.0.1:{}",environment.getProperty("server.port"));


    }
}
